Computing and communication networks typically include network devices, such as routers, firewalls, switches or gateways, which transfer or switch data, such as packets, from one or more sources to one or more destinations. A packet is a structure that encapsulates data for transmission through a network based on control information that is stored in a header portion of the packet. Network devices may operate on the packets as the packets traverse the network, such as by forwarding or filtering the packet-based network traffic.
A Ternary Content Addressable Memory (TCAM) is commonly used in network devices and other communication devices for quickly identifying the content within a packet. A network device may support a number of different features, such as a network device that functions as both a router and a firewall or a router capable of routing both Internet protocol, version 4 (IPv4) and IPv6 routing prefixes. A single TCAM device may be used to support multiple features. With the increasing number of features requiring TCAM support, such as various security and firewall features, deep packet inspection, routing, and tunnel termination features, allowing the sharing of a TCAM space can be a cost effective solution for many designs.